#include "mystdio.h"
#include "my_strlen.h"

int main()
{
    FILE_ *fp = fopen_("./log.txt", "w");
    if (fp == NULL)
    {
        return 1;
    }

    // 写入
    const char *msg = "hello mystdio!!( •̀ ω •́  )✧\n";
    fwrite_(msg, strlen(msg), fp);
    fflush_(fp);
    printf("buffer:%s\n", fp->buffer);

    fclose_(fp);

    const char *s = "hello world!\n";
    printf("strlen:%d\n", my_strlen(s));

    return 0;
}
